<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;


/**
 * App\Models\AttributeOption
 *
 * @property int $optionid 选项ID
 * @property int $typeid 分类ID
 * @property string|null $title 标题
 * @property string|null $description 描述
 * @property string|null $identifier 标识
 * @property \App\Models\AttributeType $type 类型
 * @property string|null $rules 规则
 * @property int $required 必填项
 * @property int $displayorder 排序
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereDescription($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereDisplayorder($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereIdentifier($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereOptionid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereRequired($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereRules($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\AttributeOption whereTypeid($value)
 * @mixin \Eloquent
 */
class AttributeOption extends Model
{
    protected $table = 'attribute_option';
    protected $primaryKey = 'optionid';
    protected $guarded = [];

    public $timestamps = false;

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function type()
    {
        return $this->belongsTo(AttributeType::class, 'typeid', 'typeid');
    }
}
